#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>

static int ARRAY_SIZE = 4;

void debug(int array[][ARRAY_SIZE], int row){
	int i, j;
	for(i=0;i< row; i++) {
		for(j=0; j< ARRAY_SIZE; j++){
			printf("%d\t", array[i][j]);
		}
		printf("\n");
	}
	printf("\n");
}

int main(int argc, char *argv[])
{
/*
	srand(time(NULL));
	int ran = rand()%2;
	printf("Random number: %d\n", ran);
	if(1){
		int c = 9;}
	double d = 9/2.0;
	printf("double: %f\n", d);
	printf("integer: %i\n", (int)d);
	
	int array[9][8];
	printf("array size: %i\n", sizeof(array));
	*/
	int rank, size=2, row, i, j;

	// calculate the group size
	int group_size = (int)((ARRAY_SIZE + 1.0)/size);
	int array[group_size+2][ARRAY_SIZE];
	
	srand(time(NULL));
	for(i=0;i< group_size+2; i++) {
		for(j=0; j< ARRAY_SIZE; j++){
			array[i][j] = rand()%2;
		}
	}
	
	debug(array, group_size+2);
    return 0;
}



